package com.rao.entity.VO;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 封装分页信息的
 */
@Data
@NoArgsConstructor
public class PageInfoVO<T> {
    /**
     * 查询数据列表
     */
    private List<T> records;

    /**
     * 总数
     */
    private long total;
    /**
     * 每页显示条数，默认 10
     */
    private long size;

    /**
     * 当前页
     */
    private long current;

    public PageInfoVO(List<T> records, long size, long current) {
        this.records = records;
        this.size = size;
        this.current = current;
        this.total = records.size();
    }
}
